#region License Revision: 0 Last Revised: 6/18/2008 11:00 AM
/******************************************************************************
Copyright (c) Microsoft Corporation.  All rights reserved.


This file is licensed under the Microsoft Public License (Ms-PL). A copy of the Ms-PL should accompany this file. 
If it does not, you can obtain a copy from: 

http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
******************************************************************************/
#endregion // License
using System;
using System.Windows.Browser;
using System.Diagnostics;
using ScriptInterop;

namespace VIEWS // Virtual Earth Wrapper
{

/// <summary>Initializes a new instance of the VEShapeSourceSpecification object.</summary>
public class VEShapeSourceSpecification : JSObject
{
		/// <summary>String holding JavaScript class name</summary>
	private static string thisClass = "VEShapeSourceSpecification";
	
	/// <summary>Get the JavaScript class name</summary>
	/// <returns type="String">The class name used in JavaScript </returns>		
	public override string ClassName
	{
		get { return thisClass; }
	}

	/// <summary>Construct a C# wrapper from a ScriptObject</summary>
	/// <param name="so">A ScriptObjet from JScript.</param>
	public VEShapeSourceSpecification(ScriptObject so) : base(so) { }

	/// <summary>Initializes a new instance of the VEShapeSourceSpecification object.</summary>
	/// <param name="dataType" type="VEDataType">A VEDataType Enumeration that specifies the type of data to import. Required.</param>
	/// <param name="dataSource" type="String">A URL representing the GeoRSS feed or KML data, or a globally-unique identifier (GUID) representing the Live Maps collection. Required.</param>
	public VEShapeSourceSpecification(VEDataType dataType, string dataSource)
	{
		string str = new string((char)dataType, 1); 
		ScriptObject = CreateClass(str, dataSource, null);
	}
	

	/// <summary>Initializes a new instance of the VEShapeSourceSpecification object.</summary>
	/// <param name="dataType" type="VEDataType">A VEDataType Enumeration that specifies the type of data to import. Required.</param>
	/// <param name="dataSource" type="String">A URL representing the GeoRSS feed or KML data, or a globally-unique identifier (GUID) representing the Live Maps collection. Required.</param>
	/// <param name="layer" type="VEShapeLayer">A VEShapeLayer Class object in which the VEShape objects are contained after importing. If this parameter value is null, the VEShape objects are added to the base layer.</param>
	public VEShapeSourceSpecification(VEDataType dataType, string dataSource, VEShapeLayer layer)
	{
		string str = new string((char)dataType, 1); 
		ScriptObject = CreateClass(str, dataSource, (ScriptObject)layer);
	}
	
	/// <summary name="Layer" type="VEShapeLayer">A VEShapeLayer Class object in which the VEShape objects are contained after importing. If this summaryeter value is null, the VEShape objects are added to the base layer.</summary>
	public VEShapeLayer Layer
	{
		get { var so = GetProperty<ScriptObject>("Layer"); return new VEShapeLayer(so); }
		set { SetProperty("Layer", (ScriptObject)value); }
	}
	
	/// <summary name="LayerSource" type="String">A URL representing the GeoRSS feed or KML data, or a globally-unique identifier (GUID) representing the Live Maps collection.</summary>
	public string LayerSource
	{
		get { return GetProperty<string>("LayerSource"); }
		set { SetProperty("LayerSource", value); }
	}

	/// <summary name="dataType" type="VEDataType">A VEDataType Enumeration that specifies the type of data to import.</summary>
	public VEDataType DataType
	{
		get { string str = GetProperty<string>("Type"); return (VEDataType)str[0]; }
		set { string str = new string((char)value, 1);  SetProperty("Type", str); }
	}

    /// <summary>
    /// Gets or sets the maximum number of items that can be imported from an XML file.
    /// </summary>
    /// <value>
    /// The maximum number of items that can be imported from an XML file. The default value is 200.
    /// </value>
    public int MaxImportedShapes
    {
        get { return GetProperty<int>("MaxImportedShapes"); }
        set { SetProperty("MaxImportedShapes", value); }
    }
}

}
